#include <bits/stdc++.h>
using namespace std;

int n;
int ans;
int cnt;
const int maxn = 1e5 + 5;
int r[maxn];
int h[maxn];
int f[maxn];

int main(){
	ios::sync_with_stdio(false);
	cin.tie(0); cout.tie(0);
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);

    cin >> n;
    ans = n;
    int maxx = 0;
    int temp = 0;
    for(int i = 0; i < n; ++i){
        cin >> temp;
        maxx = max(temp, maxx);
        if(!h[temp]) r[cnt++] = temp;
        h[temp]++; f[temp]++;
    }

    sort(r, r + cnt);
    int tmp = 0;
    while(tmp != ans){
        tmp = ans;
        for(int i = 0; i < cnt; ++i){
            temp = min(h[r[i]], f[r[i+1]]);
            ans -= temp;
            h[r[i]] -= temp;
            // f[r[i]] -= temp;
            f[r[i+1]] -= temp;
        }
    }

    cout << ans;

//	fclose(stdin);
//	fclose(stdout);
	return 0;
}
